package cn.congzhou.crm.query;

import lombok.Getter;
import lombok.Setter;

@Getter@Setter
public class QueryObject {

    private Integer currentPage=1;

    private Integer pageSize=20;

    private String keyword;

    public Integer getStartIndex(){
        return (currentPage-1)*pageSize;
    }

    //去除keyword为空字符串的问题
    public String getKeyword(){
        return keyword!=null && !"".equals(keyword.trim()) ? keyword : null;
    }

}
